#pragma once

#include "core/tensor.h"
#include "layer/hidden.h"

namespace  ldl
{
namespace layer
{
template<typename T>
class Linear : Hidden
{
public:
    Linear(int64_t d, int64_t h)
    {
        m_weight = Core::Tensor<T>({d,h});
        
    }
    virtual ~Linear();

    virtual Core::Tensor& forward(const Core::Tensor &input) override
    {
        return m_output;
    }
    virtual Core::Tensor& backward(const Core::Tensor &output_gradient) override
    {
        return m_input_gradient;
    }
private:
    Core::Tensor m_weight;
    Core::Tensor m_bias;
};
}
}
